home *** CD-ROM | disk | FTP | other *** search
- var g_strClassNameNormal = "DivNormal",
- g_strClassNameHover = "DivHover";
- function get_div_item(objCurrentItem)
- {
- var objItem = null;
- if (objCurrentItem.className == g_strClassNameNormal
- || objCurrentItem.className == g_strClassNameHover)
- objItem = objCurrentItem;
- if (objCurrentItem.parentElement.className == g_strClassNameNormal
- || objCurrentItem.parentElement.className == g_strClassNameHover)
- objItem = objCurrentItem.parentElement;
-
- return objItem;
- }
-
- function div_item_onmouseout() {
- // window.event.cancelBubble = true;
- var objItem = get_div_item(window.event.fromElement);
-
- //
- if (objItem != null)
- {
- objItem.idTimeout = setTimeout("window.document.all["+objItem.sourceIndex+"].className = \"DivNormal\"",1);
- }
-
- }
-
- function div_item_onmouseover()
- {
- // window.event.cancelBubble = true;
- var objItem = get_div_item(window.event.toElement);
- clearTimeout(objItem.idTimeout);
-
- if (objItem != null)
- {
- objItem.className = g_strClassNameHover;
- }
- }
-
- /*
- function div_item_onclick()
- {
- var objItem = get_div_item(window.event.srcElement);
- alert("CLICKED: "+objItem.innerText);
- }
- */
-
- /*
- function SubItem_onmouseout()
- {
- // window.event.cancelBubble = true;
- var objItem = get_div_item(window.event.fromElement);
- if (window.event.toElement == null || window.event.toElement.className != g_strClassNameHover)
- {
- objItem.idTimeout = setTimeout("window.document.all["+objItem.sourceIndex+"].className = \""+g_strClassNameNormal+"\"",1);
- }
- }
-
- function SubItem_onmouseover()
- {
- // window.event.cancelBubble = true;
- var objItem = get_div_item(window.event.toElement);
- objItem.className = g_strClassNameHover;
- clearTimeout(objItem.idTimeout);
- }
- */
-
- function set_div_item_events(objDivItem)
- {
- if (objDivItem == null)
- {
- for (var nIndex = 0; nIndex < document.body.all.length; nIndex++)
- {
- if (document.body.all[nIndex].className == g_strClassNameNormal)
- {
- set_div_item_events(document.body.all[nIndex])
- }
- }
- return;
- }
- if (objDivItem.className == g_strClassNameNormal)
- {
- objDivItem.onmouseout = div_item_onmouseout;
- objDivItem.onmouseover = div_item_onmouseover;
- objDivItem.onclick = div_item_onclick;
- }
- }
-
- function create_div_begin_tag(id)
- {
- if (g_strClassNameNormal == null || g_strClassNameNormal.length == 0)
- return null;
-
- var strId = id == null ? "" : "ID = \""+id+"\"";
- var strBeginTag = "<SPAN CLASS=\""+g_strClassNameNormal+"\" "+strId+">";
- return strBeginTag;
- }
-
- function create_div_end_tag()
- {
- return "<BR></SPAN>";
- }
-
-